package com.xuelang.pipeline.app.resource.converter;

import com.xuelang.pipeline.client.resource.dto.EnvironmentDTO;
import com.xuelang.pipeline.domain.resource.Environment;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 环境DTO与环境实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface EnvironmentDTOToEnvironmentConverter {
    EnvironmentDTOToEnvironmentConverter INSTANCE = Mappers.getMapper(EnvironmentDTOToEnvironmentConverter.class);

    /**
     * Environment转化为EnvironmentDTO
     * @param environment
     * @return
     */
    EnvironmentDTO environmentToEnvironmentDTO(Environment environment);

    /**
     * EnvironmentDTO转化为Environment
     * @param environmentDTO
     * @return
     */
    Environment environmentDTOToEnvironment(EnvironmentDTO environmentDTO);
}
